using System;
using System.Collections.Generic;
using System.Xml;
using System.Text;

namespace Workflows.Components.Reports
{
    public class QueryParameterRdlGenerator
    {
        private List<StringFieldAggregate> _StringFields;
        private List<NumberFieldAggregate> _NumberFields;
        private List<DateFieldAggregate> _DateFields;
        private List<string> _SelectedParameterNames;

        public QueryParameterRdlGenerator()
        {
            this._StringFields = new List<Workflows.Components.Reports.StringFieldAggregate>();
            this._NumberFields = new List<Workflows.Components.Reports.NumberFieldAggregate>();
            this._DateFields = new List<Workflows.Components.Reports.DateFieldAggregate>();
            this._SelectedParameterNames = new List<string>();
        }

        #region props
        public List<string> SelectedParams
        {
            get
            {
                return this._SelectedParameterNames;
            }
            set
            {
                this._SelectedParameterNames = value;
            }
        }

        public List<DateFieldAggregate> DateFields
        {
            get
            {
                return this._DateFields;
            }
            set
            {
                this._DateFields = value;
            }
        }

        public List<StringFieldAggregate> StringFields
        {
            get
            {
                return this._StringFields;
            }
            set
            {
                this._StringFields = value;
            }
        }

        public List<NumberFieldAggregate> NumberFields
        {
            get
            {
                return this._NumberFields;
            }
            set
            {
                this._NumberFields = value;
            }
        }
        #endregion

        #region add/remove fields
        public void AddQueryParameter(string paramName)
        {
            this._SelectedParameterNames.Add(paramName);
        }
        public void RemoveQueryParameter(string paramName)
        {
            this._SelectedParameterNames.Remove(paramName);
        }
        public void AddStringField(StringFieldAggregate field)
        {
            this._StringFields.Add(field);
        }
        public void AddNumberField(NumberFieldAggregate field)
        {
            this._NumberFields.Add(field);
        }
        public void AddDateField(DateFieldAggregate field)
        {
            this._DateFields.Add(field);
        }
        #endregion

        public void GenerateQueryParameters(ref XmlDocument rdlcDoc)
        {

        }
    }
}
